import 'package:FlipClock/common/color_util.dart';
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';

class CustomButton extends StatelessWidget {
  // const CustomButton({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return InkWell(
        child: Container(
          margin: EdgeInsets.only(left: 5, right: 5),
          width: 195,
          height: 115,
          decoration: BoxDecoration(
            borderRadius: BorderRadius.circular(15),
            color: ColorUtil.hex("#171717"),
          ),
          child: Stack(
            alignment: Alignment.center,
            children: [
              Icon(
                Icons.add,
                color: ColorUtil.hex("#bababa"),
                size: 100,
              ),
              Positioned(
                child: Container(
                  padding: EdgeInsets.fromLTRB(5, 3, 5, 3),
                  decoration: BoxDecoration(
                    color: Colors.grey[800],
                    borderRadius: BorderRadius.circular(5),
                  ),
                  child: Text(
                    "自定义",
                    style: Theme.of(context).textTheme.subtitle2,
                  ),
                ),
                top: 10,
                right: 10,
              ),
            ],
          ),
        ),
        onTap: () {
          // Get.toNamed('/custom');
          Fluttertoast.cancel();
          Fluttertoast.showToast(
            msg: "暂不支持",
            toastLength: Toast.LENGTH_SHORT,
            gravity: ToastGravity.BOTTOM,
            backgroundColor: Colors.white.withOpacity(0.9),
            textColor: Colors.black,
          );
        });
  }
}
